package com.hsy.swu

import com.hsy.swu.clouddb.MyUser
import com.hsy.swu.home.course.CourseUtils
import java.time.LocalDate

object MyConfig {
    /** 开学日期每个新学期都要更新 */
    var semesterStartDate: LocalDate = LocalDate.of(2025, 2, 24) // 当前学期开学日期

    var currentWeek: Int = 1

    var gradeYear = LocalDate.now().year

    fun update() {
        currentWeek = CourseUtils.getIntervalDays(semesterStartDate) / 7 + 1
        gradeYear = MyUser.currentUser.account.substring(2, 6).toInt()
    }
}